import logging,yaml,yagmail,json

def set_log():
    logging.basicConfig(filename='serviceplatformlog.txt',filemode='w+',level=logging.DEBUG,
                        format="%(filename)s-->%(levelname)s-->%(asctime)s-->%(message)s")

def send_mail(filename):
    mail=yagmail.SMTP(user="445708046@qq.com",password="bbxofqdizoegcahi",host="smtp.qq.com")
    mail.send(to="445708046@qq.com",subject="综合服务平台新增代理商接口测试报告",contents="今日报告请查收",attachments=filename)

def sed_json():
    with open("data.json",'r',encoding="utf8")as f:
        json.load(f)
        return json.load(f)